#!/usr/bin/python
# -*- coding:utf-8 -*-
# @author  : micah
# @time    :  
# @function: 
# @version :


class A:
    def __init__(self, name, obj):
        self.name = name
        self.obj = obj


class B:
    def __init__(self, gender):
        self.gender = gender


# 实例化类B
b = B('male')

# 实例化类A
a = A('micah', b)
print(a.name)
print(a.obj.gender)


""""
在一个类中需要接收另外一个类的实例对象
"""
